﻿using System;
using System.IO;
using Swifter.Json;

namespace RpcHelper.Config
{
    /// <summary>
    /// 配置扩展
    /// </summary>
    internal interface IConfig
    {
        /// <summary>
        /// 获取指定路径的JSON字符串
        /// </summary>
        /// <param name="path">配置路径</param>
        /// <returns>JSON字符串</returns>
        string GetJson(string path);
        /// <summary>
        /// 设置配置
        /// </summary>
        /// <param name="jToken"></param>
        /// <param name="configItem"></param>
        /// <returns></returns>
        bool SetConfig(string key, JsonValue obj, IConfigItem configItem);

        bool SetConfig(string key, Type type, object value, IConfigItem parent);
    }
}
